<?php
use backend\assets\AgentAsset;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;

AgentAsset::register($this);
?>
<style>
    .itemList .item-name {width: 70px;margin-right: 40px;}

    .items-list{display: inline-block;width: 170px;position: relative;margin-bottom: 20px;}
    .items span {margin-bottom:20px;display: inline-block;width: 70px;text-align: right;position: absolute;}
    .items em{ float: right;text-align: left;min-width: 60px;}
</style>
<div class="hide"><iframe name='send_post' id='send_post'></iframe></div>
<div class="clearing-wrap mt30" style="padding-left: 80px;">
    <?php ActiveForm::begin(['action'=>Url::toRoute(['financial/cashier','action'=>'arrears']),'options'=>['target'=>'send_post']]);?>
    <div class="itemList clearfix">
        <label class="item-name">现金支付</label>
        <div class="item-txt">
            <input type="text" name="cash_pay">
            <input type="hidden" name="id" value="<?=$id?>" />
        </div>
    </div>
    <div class="itemList clearfix">
        <label class="item-name">刷卡支付</label>
        <div class="item-txt">
            <input type="text" name="union_pay" />
        </div>
    </div>

    <div class="mt20">
        <div class="items">
            <div class="items-list"><span>历史支付:</span><em class="red"><?=$info->already_paid?></em></div>
            <div class="items-list"><span style="text-align: left">欠款:</span><em class="needPay red"><?=$info->debt_count?></em></div>
            <div class="items-list"><span>本次支付:</span><em class="curPay red">0</em></div>
            <div class="items-list"><span>总金额:</span><em class="red"><?=$info->total_count?></em></div>
            <div class="items-list"><span style="text-align: left;">剩余欠款:</span><em class="restPay red"><?=$info->debt_count?></em></div>
        </div>
        <div class="mg20-y" style="padding-left: 120px">
             <span class="btnBg" style="width: 92px; height: 32px;line-height: 32px;">
			  <input type="submit" value="确定" style="display: inline-block; width: 100%; background: 0; border: 0 ;padding: 0" /></span>
		     <span class="btnBg bg_rest ml20" style="width: 92px; height: 32px;line-height: 32px;">
			 <input type="reset" value="取消"  class="rest" style="display: inline-block; width: 100%; background: 0; border: 0;padding: 0"/></span>
        </div>
    </div>
    <?php ActiveForm::end();?>
</div>

<?php $this->registerJsFile("@web/system/financial/cashier/common.js",['position'=>$this::POS_END]);?>
<?php $this->registerJsFile("@web/system/financial/refund/arrears.js",['position'=>$this::POS_END]);?>